130 DEF FNC(DIL,SIZ,VMIN,VMAX)=DIL*SIZ*(VMAX-VMIN)/100+VMIN:DEF FNL(LONG,SIZ,VMIN,VMAX)=((VMAX-VMIN)*(1-LONG*SIZ/100))/2+VMIN ' calculate character offset (fnc) and label centering on axix (fnl)
135 GOTO 1000
140 LGT=LEN(LABEL$):IF VER=0 THEN XP=FNL(LGT,1.5*SX,XMIN,XMAX):YP=FNC(DEL,2*SY,YMIN,YMAX) ELSE IF HOR = 0 THEN XP=FNC(DEL,1.5*SX,XMIN,XMAX):YP=FNL(LGT,2*SY,YMIN,YMAX):RETURN ' subroutine to center label on axis
150 XP=10300*XINCH/10.2:YP=7560*YINCH/7.5:RETURN ' convert inches to plotter units
180 CLS:LOCATE 15,10:PRINT "Chose pen 1 or 2 ";
181 Z$=INKEY$:IF Z$="" THEN 181 ELSE PENO=VAL(Z$):IF PENO <0 THEN 181 ELSE PRINT Z$:RETURN 'select pen
185 ' ****** Examples of use ******
190 ' PRINT #2,FNSCALE$(XMIN,XMAX,YMIN,YMAX)
200 ' PRINT #2,FNGETPEN$(0) ' 0 to put back, # to get pen#
210 ' PRINT #2,FNPEN$("d") ' "d" for down, "u" for up
220 ' PRINT #2,FNPLOT$("a",XP,YP) '"a" for absolute, "r" for relative
230 ' XP=10300*XINCH/10.2:YP=7560*YINCH/7.5:RETURN ' convert inches to plotter units
240 ' PRINT #2,FNFIDUCIALS$(XFID1,XFID2,YFID2)
250 'PRINT #2,FNTICK$("x",.5,.5) '"x" on x axis, "y" on y axis, % total scale for above, below axis
260 ' PRINT #2,FNCHARSET$(0) ' character set 0 to 4